package com.dpf.team.controller;

import com.dpf.common.pojo.R;
import com.dpf.common.pojo.Team;
import com.dpf.team.service.TeamService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

/**
 * @author dpf
 * @version 1.0
 * @date 2023/3/23 18:07
 * @description
 */
@RestController
@RequestMapping("/team")
public class TeamController {

    @Resource
    private TeamService teamService;

    @GetMapping("/list")
    public R<List<Team>> list (){

        List<Team> list = new ArrayList<>();
        Team team = new Team();
        team.setTeamName("北京首钢队");
        list.add(team);
        Team team2 = new Team();
        team2.setTeamName("上海久事");
        list.add(team2);
        //  return teamService.list();
        return R.data(list);
    }
}
